﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RegisterDocumentView.ascx.cs" Inherits="Operations_Views_RegisterDocumentView" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxControlToolkit" %>
<%@ Register TagPrefix="spring" Namespace="Spring.Web.UI.Controls" Assembly="Spring.Web" %>
<%@ Register Assembly="Pg.BioMedics.SDR.Web.Controls" Namespace="Pg.BioMedics.SDR.Web.Controls" TagPrefix="controls" %>


<spring:DataBindingPanel ID="dataBindingPanel" runat="server">
    <table>
        <tr>
            <td class="detailsFormHeader">
                Details
            </td>
        </tr>
        <tr>
            <td>
                <table>
                    <tr>
                        <td class="detailsFormLabel">
                            <asp:Label Text="Title:" runat="server" />
                        </td>
                        <td>
                            <asp:TextBox ID="titleTextBox" BindingTarget="Document.Title" CssClass="detailsFormTextBox" runat="server" />
                            <asp:RequiredFieldValidator ID="titleRequiredFieldValidator" ControlToValidate="titleTextBox" Display="None"
                                                        ErrorMessage="Title is required" runat="server" />
                            <ajaxControlToolkit:ValidatorCalloutExtender ID="titleRequiredValidatorCalloutExtender"  HighlightCssClass="highlightValidatorCallout" 
                                                                         TargetControlID="titleRequiredFieldValidator"  
                                                                         runat="server" />                         
                        </td>                                                   
                    </tr>
                    <tr>
                        <td class="detailsFormLabel">
                            <asp:Label Text="Description:" runat="server" />
                        </td>                        
                        <td class="detailsFormValue">
                            <asp:TextBox ID="descriptionTextBox" BindingTarget="Document.Description" CssClass="detailsFormTextBox" Rows="5" TextMode="MultiLine" runat="server" />                            
                            <asp:RequiredFieldValidator ID="descriptionRequiredFieldValidator" ControlToValidate="descriptionTextBox" Display="None"
                                                        ErrorMessage="Description is required" runat="server" />
                            <ajaxControlToolkit:ValidatorCalloutExtender ID="descriptionRequiredValidatorCalloutExtender"  HighlightCssClass="highlightValidatorCallout" 
                                                                         TargetControlID="descriptionRequiredFieldValidator"  
                                                                         runat="server" />                           
                        </td>                                                                     
                    </tr>                                                                    
                </table>
                <br />
                <br />                                                             
            </td>
        </tr>                                                                                      
        <tr>
            <td class="detailsFormHeader">
                Content
            </td>
        </tr>
        <tr>
            <td>
                <table>
                    <tr>
                        <td class="detailsFormLabel">
                            <asp:Label Text="Upload file:" runat="server" />
                        </td>
                        <td class="detailsFormValue">                            
                            <controls:FileUpload Id="fileUpload" CssClass="detailsFormTextBox" runat="server" />                            
                            <asp:TextBox ID="fileUpload_validation" BorderColor="White" BorderStyle="None" ForeColor="White" width="0px" Text="abc" runat="server" />
                            <asp:CustomValidator ID="fileUploadCustomFieldValidator" Display="None" ErrorMessage="File to upload is required" 
                                                 ControlToValidate="fileUpload_validation" ClientValidationFunction="FileUpload.validate" runat="server" />
                            <ajaxControlToolkit:ValidatorCalloutExtender ID="fileUploadCustomValidatorCalloutExtender"
                                                                         TargetControlID="fileUploadCustomFieldValidator"   
                                                                         runat="server" />  
                            <br />
                            <br />
                        </td>
                    </tr>
                </table>
            </td>                            
        </tr>                        
    </table>
    <asp:Panel ID="Panel1" CssClass="detailsFormCommandPanel" runat="server">            
        <asp:LinkButton ID="registerLinkButton" Text="Register" OnClick="registerLinkButton_Click" runat="server" />         
    </asp:Panel>                                                                                      
</spring:DataBindingPanel>